/**
 * 读取本地文件实现
 * 
 * @author Gill Gong
 */

import { loaderClassForExtension } from 'expo-three/build/loaderClassForExtension';

export async function localLoadAsync(url, onAssetRequested = function () { }) {

  const GLTFLoader = loaderClassForExtension('gltf');
  const loader = new GLTFLoader();
  
  return new Promise((res, rej)=>{
    loader.load(url,res, null, rej)
  })
}